package com.itheima.controller;

import com.itheima.health.entity.Result;
import com.itheima.health.service.ReportService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**

 */
@RestController
public class ReportController {

    @Reference
    private ReportService reportService;

    @GetMapping("report/memberReportByLastYear")
    public Result MemberReportByLastYear(){
        return new Result(reportService.memberReportByLastYear());
    }

    @GetMapping("report/setmealProportion")
    public Result setmealProportion(){
        return new Result(reportService.setmealProportion());
    }

    @GetMapping("report/memberBySex")
    public Result memberBySex(){
        return new Result(reportService.memberBySex());
    }

    @GetMapping("report/memberByAge")
    public Result memberByAge(){
        return new Result(reportService.memberByAge());
    }
}
